/* simple-icon-view.h */

#ifndef _SIMPLE_ICON_VIEW_H
#define _SIMPLE_ICON_VIEW_H

#include <glib-object.h>
#include <nbtk/nbtk.h>
#include "simplerender.hh"
G_BEGIN_DECLS

#ifndef NBTK_PARAM_READABLE
#define NBTK_PARAM_READABLE     \
        (G_PARAM_READABLE |     \
         G_PARAM_STATIC_NICK | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB)
#endif

#ifndef NBTK_PARAM_READWRITE
#define NBTK_PARAM_READWRITE    \
        (G_PARAM_READABLE | G_PARAM_WRITABLE | \
         G_PARAM_STATIC_NICK | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB)
#endif


#define SIMPLE_TYPE_ICON_VIEW simple_icon_view_get_type()

#define SIMPLE_ICON_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  SIMPLE_TYPE_ICON_VIEW, SimpleIconView))

#define SIMPLE_ICON_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), \
  SIMPLE_TYPE_ICON_VIEW, SimpleIconViewClass))

#define SIMPLE_IS_ICON_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  SIMPLE_TYPE_ICON_VIEW))

#define SIMPLE_IS_ICON_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
  SIMPLE_TYPE_ICON_VIEW))

#define SIMPLE_ICON_VIEW_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  SIMPLE_TYPE_ICON_VIEW, SimpleIconViewClass))

typedef struct _SimpleIconViewPrivate SimpleIconViewPrivate;

/**
 * SimpleIconView:
 *
 * The contents of the this structure are private and should only be accessed
 * through the public API.
 */
typedef struct {
  /*< private >*/
  NbtkGrid parent;

  SimpleIconViewPrivate *priv;
} SimpleIconView;

typedef struct {
  NbtkGridClass parent_class;
} SimpleIconViewClass;

GType simple_icon_view_get_type (void);

NbtkWidget* simple_icon_view_new (void);

void         simple_icon_view_set_model (SimpleIconView *icon_view,
                                       ClutterModel *model);
ClutterModel* simple_icon_view_get_model (SimpleIconView *icon_view);

void              simple_icon_view_set_cell_renderer (SimpleIconView     *icon_view,
                                                    SimpleRenderer *renderer);
SimpleRenderer* simple_icon_view_get_cell_renderer (SimpleIconView *icon_view);

void
simple_icon_view_add_attribute (SimpleIconView *icon_view,
                              const gchar *attribute,
                              gint column);
void
simple_icon_view_add_attachdata (SimpleIconView *icon_view,
                              const gchar *attachname,
                              gint column);

void simple_icon_view_freeze (SimpleIconView *icon_view);
void simple_icon_view_thaw (SimpleIconView *icon_view);
void simple_icon_view_set_callback_for_child(SimpleIconView *icon_view,gpointer data);

void simple_icon_view_set_max_number(SimpleIconView *icon_view, gint max_number);
void simple_icon_view_set_first_page(SimpleIconView *icon_view);
void simple_icon_view_set_next_page(SimpleIconView *icon_view);
void simple_icon_view_set_prev_page(SimpleIconView *icon_view);
void simple_icon_view_set_last_page(SimpleIconView *icon_view);
gboolean simple_icon_view_has_prev_page(SimpleIconView *icon_view);
gboolean simple_icon_view_has_next_page(SimpleIconView *icon_view);
gint simple_icon_view_get_page_number(SimpleIconView *icon_view);
G_END_DECLS

#endif /* _SIMPLE_ICON_VIEW_H */
